package com.jdrx.sw.sewage.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

/**
 * @Author: zyc
 * @Date: 2020/4/16
 * 数据初始化
 */

@Component
public class SewageAppBootStrap implements ApplicationListener<ContextRefreshedEvent> {


    /**
     * 根据租户，刷新每个租户下的设备缓存
     */
    public void applicationInitialization() {
    }

    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        try {
            applicationInitialization();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
}
